import { onMounted, ref } from "vue";

export function useXY() {

    const x = ref<number | null>(null);
    const y = ref<number | null>(null);

    onMounted(() => {


        window.addEventListener("click", (e) => {

            console.log(e);
            x.value=e.pageX;
             y.value=e.pageY;
            


        })
    })
    return { x, y };



}